<html>
<head>
  <title>WebRTC PeerConnection</title>
  <link href="css/main.css" rel="stylesheet" />
</head>

<body>
<div>

  <div>
    <button id="connserver">Connect Sig Server</button>
    <button id="leave" disabled>Leave</button>
  </div>

  <div>
    <label for="bandwidth">Bandwidth:</label>
    <!--
      建立连接之后才能控制速率, 故先设置为disabled
    -->
    <select id = "bandwidth" disabled>
      <option value="unlimited" selected>unlimited</option>
      <option value="2000">2000</option>
      <option value="1000">1000</option>
      <option value="500">500</option>
      <option value="250">250</option>
      <option value="125">125</option>
    </select>
    kbps
  </div>


  <div id="preview">
    <div >
      <h2>Local:</h2>
      <video id="localvideo" autoplay playsinline muted></video>
    </div>
    <div>
      <h2>Remote:</h2>
      <video id="remotevideo" autoplay playsinline></video>
    </div>

  </div>

</div>

<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.1.2/socket.io.min.js"></script>
<script src="https://webrtc.github.io/adapter/adapter-latest.js"></script>
<script src="js/main_bw.js"></script>
</body>
</html>
